package main

import "fmt"

func main() {
	// var arr1 []int
	// fmt.Printf("%v - %T - 长度:%v\n", arr1, arr1, len(arr1))

	// var arr2 = []int{1, 2, 3, 4, 5}
	// fmt.Printf("%v - %T - 长度:%v\n", arr2, arr2, len(arr2))

	// var arr3 = []int{1: 2, 2: 3, 3: 4, 4: 5, 5: 6}
	// fmt.Printf("%v - %T - 长度:%v\n", arr3, arr3, len(arr3))

	// 切片的声明 初始化
	var arr1 []int
	fmt.Printf("%v - %T - 长度:%v\n", arr1, arr1, len(arr1))
	fmt.Println(arr1 == nil)

	var arr2 = []int{1, 2, 34, 56}
	fmt.Printf("%v - %T - 长度:%v\n", arr2, arr2, len(arr2))

	var arr3 = []int{1: 2, 2: 4, 3: 6}
	fmt.Printf("%v - %T - 长度:%v\n", arr3, arr3, len(arr3))

}
